using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Collections;
using Castle.MonoRail;
using Castle.MonoRail.Framework;
using DotNet_Common;

namespace res.Controllers
{

	public class Block2Component : ViewComponent
    {
        string keyword;

        public override void Initialize()
        {
            keyword = (string)ComponentParams["keyword"];

            base.Initialize();
        }

		public override void Render()
		{
            string sql = "";
			DbExecuter db = new DbExecuter();


            //sql = "select * from res_book where title like '%" + keyword + "%' limit 6";
			//DataTable data = db.Exec(sql);
            //PropertyBag["data"] = data.Rows;
            PropertyBag["keywordshow"] = keyword;
            PropertyBag["keyword"] = HttpUtility.UrlEncode(keyword, System.Text.Encoding.UTF8);
			base.Render();
		}
    }
    
}